//
//  BLMomentModel.m
//  Byelone
//
//  Created by Qi Liu on 2021/2/16.
//

#import "BLMomentModel.h"


@implementation UserHomeBaseVo
//+ (NSDictionary *)mj_replacedKeyFromPropertyName{
//    return @{@"Id":@"id"};
//}
//+ (NSDictionary *)mj_objectClassInArray{
//    return @{@"posList":@"BLInfoPosItem"};
//}
@end


@implementation BaseRepler

@end

@implementation URLModel
-(NSString *)momentUrl{
    if ([_momentUrl rangeOfString:@"http"].location == NSNotFound) {
        _momentUrl = [NSString stringWithFormat:@"%@%@",BL_ALI_OSS,_momentUrl];
    }
    return _momentUrl;
}

-(BOOL)isVerticalContent{
    if ([_height floatValue] >= [_width floatValue]) {
        _isVerticalContent = YES;
    }
    return _isVerticalContent;
}

@end

@implementation ReplyModel

@end


@implementation BLMomentModel
+ (NSDictionary *)mj_objectClassInArray{
    return @{@"replyList":@"ReplyModel",
             @"momentUrlList":@"URLModel"
    };
}

//-(NSArray <URLModel *> * )momentUrlList{
//    [_momentUrlList enumerateObjectsUsingBlock:^(URLModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
//        URLModel * model = (URLModel *)obj;
//        if ([model.momentUrl rangeOfString:@""].location == NSNotFound) {
//            model.momentUrl = [NSString stringWithFormat:@"%@%@",BL_ALI_OSS,model.momentUrl];
//        }
//    }];
//    return _momentUrlList;
//}

//-(NSArray *)momentUrlArray{
//    
//    NSMutableArray * keyarray = [NSMutableArray array];
//    for (int i = 1; i<=9; i++) {
//        NSString * momentUrl = [NSString stringWithFormat:@"momentUrl%d",i];
//        [keyarray addObject:momentUrl];
//    }
//    
//    __block NSMutableArray * array = [NSMutableArray array];
//    NSDictionary * valueDic = [self mj_keyValuesWithKeys:[keyarray copy]];
//    [valueDic enumerateKeysAndObjectsUsingBlock:^(id  _Nonnull key, id  _Nonnull obj, BOOL * _Nonnull stop) {
//        NSString * momentUrl = [NSString stringWithFormat:@"%@%@",BL_ALI_OSS,obj];
//        [array addObject:momentUrl];
//    }];
//    
//    return [array copy];
//}

@end




